package com.kd.juhaowan.ui.holder;

import android.annotation.SuppressLint;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;


import com.kd.juhaowan.R;
import com.kd.juhaowan.http.model.SmallAccountModel;
import com.kd.juhaowan.ui.adapter.BaseViewHolder;

import butterknife.BindView;

public class SmallAccountViewHolder extends BaseViewHolder {




    @BindView(R.id.item_smallaccount_box)
    ImageView imageView;
    @BindView(R.id.item_smallaccount_name)
    TextView nameView;
    public SmallAccountViewHolder(@NonNull View itemView) {
        super(itemView);


    }



    @SuppressLint("ResourceType")
    public void setDate(SmallAccountModel model, boolean isSelect){
        nameView.setText(model.getNickname()+"-"+model.getServer_name()+"-"+model.getRole_name());
        imageView.setImageResource(isSelect?R.drawable.smallaccount_checkbox_select:R.drawable.smallaccount_checkbox_default);
    }


}
